
import { NativeModules, DeviceEventEmitter } from 'react-native';

const { RNBaiduAsr } = NativeModules;

/**
 * 语音识别结果监听
 * @param {*} callback 
 */
export function listenBaiduAsrResult(callback){
  DeviceEventEmitter.addListener('BaiduAsrResult', callback)
}

/**
 * 唤醒结果监听
 * @param {*} callback 
 */
export function listenBaiduAsrWakeup(callback){
  DeviceEventEmitter.addListener('BaiduAsrWakeup', callback)
}


export default RNBaiduAsr;
